<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<!-- RichFaces tag library declaration -->
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Log in / create account</title>
</head>
<body>
<f:view>
	<h:form>
		<rich:panel style="width:60%; margin-left:auto; margin-right:auto;"
			header="Форма за създаване на ново задание">
			<h:panelGrid style="width:90%; margin-left:auto; margin-right:auto;">
				<h:outputText value="Заглавие на заданието" />
				<h:inputTextarea style="width:100%;"
					value="#{mbLecturer.newTask.title}" />
				<h:panelGroup>
					<h:outputText value="Последен срок до: " />
					<rich:calendar value="#{mbLecturer.newTask.endDate}"
						datePattern="#{mbLecturer.datePattern}" enableManualInput="false" />
				</h:panelGroup>
				<h:outputText value="Съдържание" />
				<rich:editor theme="simple" validator="#{mbLecturer.validator}"
					viewMode="#{mbLecturer.viewMode}" width="750" height="400"
					value="#{mbLecturer.newTask.text}">
					<f:param name="simple_advanced_buttons1"
						value="bold,italic,underline, cut,copy,paste,pasteword" />
					<f:param name="simple_advanced_toolbar_location" value="top" />
					<f:param name="simple_advanced_toolbar_align" value="left" />
				</rich:editor>
				<h:outputText value="Прикачени файлове" />
				<rich:fileUpload listWidth="750" listHeight="50"
					fileUploadListener="#{mbLecturer.listener}"
					maxFilesQuantity="#{mbLecturer.uploadsAvailable}" id="upload"
					immediateUpload="#{mbLecturer.autoUpload}" acceptedTypes="rar, zip"
					allowFlash="#{mbLecturer.useFlash}">
					<a4j:support event="onclear" reRender="upload"
						action="#{mbLecturer.clearFile}" />
				</rich:fileUpload>
				<h:outputText value="Забележка" />
				<h:inputTextarea rows="2" style="width:100%;"
					value="#{mbLecturer.newTask.description}" />
			</h:panelGrid>
			<rich:spacer height="15" />
			<h:panelGroup>
				<a4j:commandButton action="#{mbLecturer.saveLecturerTask}"
					value="Създаване" />
				<a4j:commandButton value="Отказ"
					action="#{mbLecturer.navToLecturerMain}" />
			</h:panelGroup>
		</rich:panel>
	</h:form>
</f:view>
</body>
</html>